package com.zide.auth.domain.entity.platform;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zide.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author 石添
 * @date 2024/8/25
 */
@Schema(description = "菜单目录")
@Data
@TableName("platform_menu")
public class PlatformMenu extends BaseEntity {

    @Schema(description = "父级菜单id")
    private Long parentId;

    @Schema(description = "菜单名称")
    private String menuName;

    @Schema(description = "路由地址")
    private String menuRouter;

    @Schema(description = "菜单权限标识，member:user:add")
    private String menuCode;

    @Schema(description = "排序")
    private Integer sorts;

    @Schema(description = "菜单类型")
    private Integer menuType;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "查询参数")
    private String query;

    @Schema(description = "是否外链")
    private Integer isFrame;

    @Schema(description = "是否显示")
    @TableField("`show`")
    private Integer show;

    @Schema(description = "状态")
    private Integer status;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "子菜单")
    @TableField(exist = false)
    private List<PlatformMenu> children;
}
